package com.javapda.c328r.command;

/**
 * Light Frequency Type
 * 50Hz 00h
 * 60Hz 01h
 * @author javapda
 *
 */
public abstract class ComediaLightFrequencyType {
	public static final int FREQ_50_HZ = 0x00;
	public static final int FREQ_60_HZ = 0x01;
	public static String convert(int code) {
		if ( FREQ_50_HZ == code ) return "FREQ_50_HZ";
		if ( FREQ_60_HZ == code ) return "FREQ_60_HZ";
		throw new RuntimeException("ERROR: unknown Light Frequency Code: " + code);
	}
	public static int convert(String code) {
		if ( "FREQ_50_HZ".equals(code) ) return FREQ_50_HZ;
		if ( "FREQ_60_HZ".equals(code) ) return FREQ_60_HZ;
		throw new RuntimeException("ERROR: unknown Light Frequency Code: " + code);
	}
	
}
